home *** CD-ROM | disk | FTP | other *** search
- From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- Date: Mon, 6 Dec 93 11:20:09 +0100
- Message-Id: <9312061020.AA00631@issan.informatik.uni-dortmund.de>
- To: mint@atari.archive.umich.edu
- Subject: MiNT 1.09: Bug in Fselect
-
- Fselect does not work correctly if identical pointers gets passed,
- for example:
-
- int fds = 1;
- Fselect (0, &fds, &fds, 0);
-
- fds is cleared before it is read the second time (via *wfdp).
-
- Of course, this is not very usefull, but configure from the screen
- package depends on it.
-
- --- orig/dosfile.c Mon Aug 2 19:00:44 1993
- +++ dosfile.c Sat Dec 4 17:32:46 1993
- @@ -965,19 +965,21 @@
- TIMEOUT *t;
- short sr;
-
- - if (xfdp)
- - *xfdp = 0;
- -
- if (rfdp) {
- - rfd = *rfdp; *rfdp = 0;
- + rfd = *rfdp;
- }
- else
- rfd = 0;
- if (wfdp) {
- - wfd = *wfdp; *wfdp = 0;
- + wfd = *wfdp;
- }
- else
- wfd = 0;
- +
- + /* Watch out for aliasing */
- + if (rfdp) *rfdp = 0;
- + if (wfdp) *wfdp = 0;
- + if (xfdp) *xfdp = 0;
-
- TRACE(("Fselect(%u, %lx, %lx)", timeout, rfd, wfd));
- p = curproc; /* help the optimizer out */
-